import 'dart:io';

import 'package:flutter/material.dart';
import 'package:mirror/AppStyle.dart';

class HeaderWidget extends StatelessWidget {
  final String url;
  final String path;

  const HeaderWidget({super.key, required this.url, required this.path});

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
          image: DecorationImage(
              image: path.isNotEmpty
                  ? Image.file(File(path)).image
                  : NetworkImage(url),
              fit: BoxFit.cover),
          shape: BoxShape.circle,
          border: Border.all(color: Constant.mainColor, width: 0.5)),
      child: const Padding(
        padding: EdgeInsets.all(25),
      ),
    );
  }
}
